public class Member implements Comparable<Member> {
	private String memberName;
	private int memberPopulation;
	private int seatsGiven = 0;
	
	public Member(String memberName, int memberPopulation) {
		this.memberName = memberName;
		this.memberPopulation = memberPopulation;
	}
	
	public int compareTo(Member T) {
		if((memberPopulation/this.getD()) > (T.getPopulation()/T.getD()))
			return 1;
		else if((memberPopulation/this.getD()) == (T.getPopulation()/T.getD()))
			return 0;
		else
			return -1;
	}
	
	public void addSeat() {
		seatsGiven++;
	}
	
	public int getSeats() {
		return seatsGiven;
	}
	
	public int getPopulation() {
		return memberPopulation;
	}
	
	public String getName() {
		return memberName;
	}
	
	public double getD() {
		return Math.sqrt(seatsGiven*(seatsGiven+1));
	}
}
